\(\int \frac {A+B \log (e (a+b x)^n (c+d x)^{-n})}{(a+b x) (c+d x)} \, dx\) [230]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [B] (verification not implemented)
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 38, antiderivative size = 45 \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x) (c+d x)} \, dx=\frac {\left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2}{2 B (b c-a d) n} \]

[Out]

1/2*(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))^2/B/(-a*d+b*c)/n

Rubi [A] (verified)

Time = 0.09 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.079, Rules used = {2573, 2561, 2338} \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x) (c+d x)} \, dx=\frac {\left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )^2}{2 B n (b c-a d)} \]

[In]

Int[(A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n])/((a + b*x)*(c + d*x)),x]

[Out]

(A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n])^2/(2*B*(b*c - a*d)*n)

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2561

Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*(B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m
_.)*((h_.) + (i_.)*(x_))^(q_.), x_Symbol] :> Dist[(b*c - a*d)^(m + q + 1)*(g/b)^m*(i/d)^q, Subst[Int[x^m*((A +
 B*Log[e*x^n])^p/(b - d*x)^(m + q + 2)), x], x, (a + b*x)/(c + d*x)], x] /; FreeQ[{a, b, c, d, e, f, g, h, i,
A, B, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[b*f - a*g, 0] && EqQ[d*h - c*i, 0] && IntegersQ[m, q]

Rule 2573

Int[((A_.) + Log[(e_.)*(u_)^(n_.)*(v_)^(mn_)]*(B_.))^(p_.)*(w_.), x_Symbol] :> Subst[Int[w*(A + B*Log[e*(u/v)^
n])^p, x], e*(u/v)^n, e*(u^n/v^n)] /; FreeQ[{e, A, B, n, p}, x] && EqQ[n + mn, 0] && LinearQ[{u, v}, x] &&  !I
ntegerQ[n]

Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a+b x) (c+d x)} \, dx,e \left (\frac {a+b x}{c+d x}\right )^n,e (a+b x)^n (c+d x)^{-n}\right ) \\ & = \text {Subst}\left (\frac {\text {Subst}\left (\int \frac {A+B \log \left (e x^n\right )}{x} \, dx,x,\frac {a+b x}{c+d x}\right )}{b c-a d},e \left (\frac {a+b x}{c+d x}\right )^n,e (a+b x)^n (c+d x)^{-n}\right ) \\ & = \frac {\left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2}{2 B (b c-a d) n} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.96 \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x) (c+d x)} \, dx=\frac {\left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2}{2 (b B c n-a B d n)} \]

[In]

Integrate[(A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n])/((a + b*x)*(c + d*x)),x]

[Out]

(A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n])^2/(2*(b*B*c*n - a*B*d*n))

Maple [A] (verified)

Time = 3.84 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.38

method result size
derivativedivides \(-\frac {\frac {B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )^{2}}{2}+\ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) A}{n \left (a d -c b \right )}\) \(62\)
default \(-\frac {\frac {B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )^{2}}{2}+\ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) A}{n \left (a d -c b \right )}\) \(62\)
parts \(\frac {A \ln \left (d x +c \right )}{a d -c b}-\frac {\ln \left (b x +a \right ) A}{a d -c b}-\frac {B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )^{2}}{2 n \left (a d -c b \right )}\) \(76\)
parallelrisch \(-\frac {B \,a^{2} c^{2} \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )^{2}+2 A \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) a^{2} c^{2}}{2 c^{2} a^{2} n \left (a d -c b \right )}\) \(80\)
risch \(\text {Expression too large to display}\) \(1152\)

[In]

int((A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))/(b*x+a)/(d*x+c),x,method=_RETURNVERBOSE)

[Out]

-1/n/(a*d-b*c)*(1/2*B*ln(e*(b*x+a)^n/((d*x+c)^n))^2+ln(e*(b*x+a)^n/((d*x+c)^n))*A)

Fricas [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.60 \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x) (c+d x)} \, dx=\frac {B n \log \left (b x + a\right )^{2} + B n \log \left (d x + c\right )^{2} + 2 \, {\left (B \log \left (e\right ) + A\right )} \log \left (b x + a\right ) - 2 \, {\left (B n \log \left (b x + a\right ) + B \log \left (e\right ) + A\right )} \log \left (d x + c\right )}{2 \, {\left (b c - a d\right )}} \]

[In]

integrate((A+B*log(e*(b*x+a)^n/((d*x+c)^n)))/(b*x+a)/(d*x+c),x, algorithm="fricas")

[Out]

1/2*(B*n*log(b*x + a)^2 + B*n*log(d*x + c)^2 + 2*(B*log(e) + A)*log(b*x + a) - 2*(B*n*log(b*x + a) + B*log(e)
+ A)*log(d*x + c))/(b*c - a*d)

Sympy [F(-1)]

Timed out. \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x) (c+d x)} \, dx=\text {Timed out} \]

[In]

integrate((A+B*ln(e*(b*x+a)**n/((d*x+c)**n)))/(b*x+a)/(d*x+c),x)

[Out]

Timed out

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 151 vs. \(2 (43) = 86\).

Time = 0.21 (sec) , antiderivative size = 151, normalized size of antiderivative = 3.36 \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x) (c+d x)} \, dx=B {\left (\frac {\log \left (b x + a\right )}{b c - a d} - \frac {\log \left (d x + c\right )}{b c - a d}\right )} \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A {\left (\frac {\log \left (b x + a\right )}{b c - a d} - \frac {\log \left (d x + c\right )}{b c - a d}\right )} - \frac {{\left (e n \log \left (b x + a\right )^{2} - 2 \, e n \log \left (b x + a\right ) \log \left (d x + c\right ) + e n \log \left (d x + c\right )^{2}\right )} B}{2 \, {\left (b c - a d\right )} e} \]

[In]

integrate((A+B*log(e*(b*x+a)^n/((d*x+c)^n)))/(b*x+a)/(d*x+c),x, algorithm="maxima")

[Out]

B*(log(b*x + a)/(b*c - a*d) - log(d*x + c)/(b*c - a*d))*log((b*x + a)^n*e/(d*x + c)^n) + A*(log(b*x + a)/(b*c
- a*d) - log(d*x + c)/(b*c - a*d)) - 1/2*(e*n*log(b*x + a)^2 - 2*e*n*log(b*x + a)*log(d*x + c) + e*n*log(d*x +
 c)^2)*B/((b*c - a*d)*e)

Giac [F]

\[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x) (c+d x)} \, dx=\int { \frac {B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A}{{\left (b x + a\right )} {\left (d x + c\right )}} \,d x } \]

[In]

integrate((A+B*log(e*(b*x+a)^n/((d*x+c)^n)))/(b*x+a)/(d*x+c),x, algorithm="giac")

[Out]

integrate((B*log((b*x + a)^n*e/(d*x + c)^n) + A)/((b*x + a)*(d*x + c)), x)

Mupad [B] (verification not implemented)

Time = 1.36 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.58 \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x) (c+d x)} \, dx=-\frac {B\,{\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )}^2-A\,n\,\mathrm {atan}\left (\frac {b\,c\,2{}\mathrm {i}+b\,d\,x\,2{}\mathrm {i}}{a\,d-b\,c}+1{}\mathrm {i}\right )\,4{}\mathrm {i}}{2\,n\,\left (a\,d-b\,c\right )} \]

[In]

int((A + B*log((e*(a + b*x)^n)/(c + d*x)^n))/((a + b*x)*(c + d*x)),x)

[Out]

-(B*log((e*(a + b*x)^n)/(c + d*x)^n)^2 - A*n*atan((b*c*2i + b*d*x*2i)/(a*d - b*c) + 1i)*4i)/(2*n*(a*d - b*c))